Change in openvpn[release/2.6]: Fix '--inactive <time> 0' behavior for DCO
A message that is not in the archive (sent off-list or not yet received): gerrit.1679478040000.I4c089e486728a43bfe42596787c00355838311da@...2715...
flichtenheld has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/201?usp=email )
Change subject: Fix '--inactive <time> 0' behavior for DCO
......................................................................
Fix '--inactive <time> 0' behavior for DCO
Make sure we exit if <bytes> is 0 (not set) and no traffic was produced.
According to man page and non-DCO --inactive implementation, we exit if amount of bytes produced is less than <bytes> specified. DCO implementation will do off-by-ones, but we consider it as okay since we don't want to complicate code to handle both bytes=0 and >0 cases.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/search?l=mid&[email protected]...
---
M src/openvpn/forward.c
1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/forward.c +1 -1
@@ -481,7 +481,7 @@int64_t tot_bytes = c->c2.tun_read_bytes + c->c2.tun_write_bytes;int64_t new_bytes = tot_bytes - c->c2.inactivity_bytes; -if (new_bytes >= c->options.inactivity_minimum_bytes) +if (new_bytes > c->options.inactivity_minimum_bytes) { c->c2.inactivity_bytes = tot_bytes;event_timeout_reset (&c->c2.inactivity_interval);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/201?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I4c089e486728a43bfe42596787c00355838311da
Gerrit-Change-Number: 201
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged
stipa has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/201?usp=email )
Change subject: Fix '--inactive <time> 0' behavior for DCO
......................................................................
Fix '--inactive <time> 0' behavior for DCO
Make sure we exit if <bytes> is 0 (not set) and no traffic was produced.
According to man page and non-DCO --inactive implementation, we exit if amount of bytes produced is less than <bytes> specified. DCO implementation will do off-by-ones, but we consider it as okay since we don't want to complicate code to handle both bytes=0 and >0 cases.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/search?l=mid&[email protected]...
---
M src/openvpn/forward.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/01/201/2
src/openvpn/forward.c +1 -1
@@ -481,7 +481,7 @@int64_t tot_bytes = c->c2.tun_read_bytes + c->c2.tun_write_bytes;int64_t new_bytes = tot_bytes - c->c2.inactivity_bytes; -if (new_bytes >= c->options.inactivity_minimum_bytes) +if (new_bytes > c->options.inactivity_minimum_bytes) { c->c2.inactivity_bytes = tot_bytes;event_timeout_reset (&c->c2.inactivity_interval);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/201?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I4c089e486728a43bfe42596787c00355838311da
Gerrit-Change-Number: 201
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newchange